<?php
include "./mods/sql_mod/sql_config.php";
$cmd = "SELECT * FROM `zzhk`.`zzhk_user`";
$sql = mysqli_query($conn, $cmd);
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<title>查看修改用户</title>
	<link href="css/bootstrap.min.css?version=vjVersion" rel="stylesheet" type="text/css" />
	<link href="css/AdminLTE.min.css?version=vjVersion" rel="stylesheet" type="text/css" />
	<link href="css/font-awesome.min.css?version=vjVersion" rel="stylesheet" type="text/css" />
	<link href="css/skins/_all-skins.min.css?version=vjVersion" rel="stylesheet" type="text/css" />
	<link href="css/ui.jqgrid-bootstrap.css?version=vjVersion" rel="stylesheet" type="text/css" />
	<link href="css/vjpage.css?version=vjVersion" rel="stylesheet" type="text/css" />
	<link href="css/config.css?version=vjVersion" rel="stylesheet" type="text/css" />
</head>
<body data-curpagename="look_users" data-curpagecname="查看修改用户" class="skin-blue">
<section id="look_users_users_jPanel1" class="content-header">
	<ol id="look_users_users_jPathNavigation1" class="breadcrumb pull-right">
		<li><a href="#" target="_self">共有任务</a></li>
		<li class="active">我的任务</li>
	</ol>
	<h1 id="look_users_users_jLabel2">用户信息</h1>
</section>
<section id="look_users_users_jPanel2" class="content">
	<div id="look_users_users_jExtPanel1" class="box box-default">	
		<div class="box-header with-border">
			用户	
			<div class="box-tools pull-right">	
				<button id="look_users_users_jButton4" type="button" class="btn btn-default btn-sm">增加</button>
				<button id="look_users_users_jButton3" type="button" class="btn btn-default btn-sm">修改</button>
				<button id="look_users_users_jButton2" type="button" class="btn btn-default btn-sm">删除</button>
				<button id="look_users_users_jButton1" type="button" class="btn btn-default btn-sm">查看</button>
			</div>
		</div>
		<div class="box-body">
			<table id="look_users_users_jDataGrid1"></table><div id="look_users_users_jDataGrid1_pager"></div>
		</div>
	</div>
</section>


</body>

<script type="text/javascript" src="js/jquery-3.3.1.min.js?version=vjVersion"></script>
<script type="text/javascript" src="js/bootstrap.min.js?version=vjVersion"></script>
<script type="text/javascript" src="js/adminlte.min.js?version=vjVersion"></script>
<script type="text/javascript" src="js/jquery.cookie.js?version=vjVersion"></script>
<script type="text/javascript" src="js/jquery.validate.min.js?version=vjVersion"></script>
<script type="text/javascript" src="js/jquery.validate.extend.js?version=vjVersion"></script>
<script type="text/javascript" src="js/grid.locale-cn.js?version=vjVersion"></script>
<script type="text/javascript" src="js/jquery.jqGrid.min.js?version=vjVersion"></script>
<script type="text/javascript">

    jQuery().ready(function(){
        $.jgrid.defaults.styleUI = 'Bootstrap';
        $.jgrid.defaults.responsive = true;
        jQuery('#look_users_users_jDataGrid1').jqGrid({
            datatype: 'local',
            autowidth: true,
            cellEdit: false,
            gridview: true,
            altRows:true,
            viewrecords: true,
            colNames:['编号','姓名','用户名','性别','身份证号','联系方式','编辑'],
            colModel:[
                {name:'A0',index:'A0', width:64},
                {name:'A1',index:'A1', width:64},
                {name:'A2',index:'A2', width:106},
                {name:'A3',index:'A3', width:64},
                {name:'A4',index:'A4', width:400},
                {name:'A5',index:'A5', width:329},
                {name:'A6',index:'A6', width:64}
            ],
            width: 1002,
            height: 391,
            shrinkToFit: false,
            rowNum:10,
            pager: jQuery('#look_users_users_jDataGrid1_pager')
        }).navGrid('#look_users_users_jDataGrid1_pager',{edit:false,add:false,del:false,refresh:false,search:false});
        var look_users_users_jDataGrid1data=[
            <?php
            while ($row = mysqli_fetch_object($sql)) {
            ?>
            {A0:'<?php $row->id ?>',A1:'<?php $row->name ?>',A2:'<?php $row->user ?>',A3:'<?php $row->sex ?>',A4:'<?php $row->id_card ?>',A5:'<?php $row->phone ?>',A6:''},
            <?php } ?>
        ]
        for(i in look_users_users_jDataGrid1data){
            $('#look_users_users_jDataGrid1').jqGrid('addRowData',i+1,look_users_users_jDataGrid1data[i]);
        }
        $('#look_users_users_jDataGrid1').closest('.ui-jqgrid-bdiv').css({'overflow-y': 'auto'});
        $('#look_users_users_jDataGrid1').trigger('reloadGrid');
    })

</script>
<script type="text/javascript">
</script>
</html>
